package com.lune.job.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lune.job.mapper.MenuMapper;
import com.lune.job.pojo.Menu;
import com.lune.job.service.IMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Caiyilin
 * @since 2022-03-06
 */
@Service
public class MenuServiceImpl extends ServiceImpl<MenuMapper, Menu> implements IMenuService {

    @Autowired
    private MenuMapper menuMapper;

    /**
     * 根据id获取菜单
     * @param id
     * @return
     */
    @Override
    public List<Menu> getMenusById(Integer id) {
        return menuMapper.getMenusById(id);
    }

    /**
     * 条件查询 菜单
     */
    public  List<Menu> queryByMenu(Menu menu){
        return menuMapper.queryByMenu(menu);
    }
}
